  @include("user.head")
  <!-- 公共头部 -->

<div id="content_person">
  <div class="row">
    <div class="col-xs-3">
      @include("user.uc.navigation")
    </div>
    <div class="col-xs-9">
      @include("user.uc.verify_head")
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title">行业信息</h3>
        </div>
        <div class="panel-body">
          <div class="form-horizontal">
            <div class="form-group">
              <label class="col-xs-3 control-label label_size">专业技术人员名册</label>
              <div class="col-xs-6">
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label label_size">姓名</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="real_name" placeholder="" type="text">
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label label_size">性别</label>
              <div class="col-xs-6">
                <div class="radio">
                  <label>
                    <input name="gender" id="" value="1" checked="" type="radio">
                    男
                  </label>
                  <label>
                    <input name="gender" id="" value="0" type="radio">
                    女
                  </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label label_size">学历</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="education" placeholder="" type="text">
              </div>
            </div>

            <div class="form-group">
              <label class="col-xs-3 control-label label_size">专业</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="profession" placeholder="" type="text">
              </div>
            </div>

            <div class="form-group">
              <label class="col-xs-3 control-label label_size">职称</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="job" placeholder="" type="text">
              </div>
            </div>

            <!-- <legend></legend> -->

            <div class="form-group">
              <label class="col-xs-3 control-label label_size">测量仪器</label>
              <div class="col-xs-6">
              </div>
            </div>

            <div class="form-group">
              <label class="col-xs-3 control-label label_size">设备名称</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="name" placeholder="" type="text">
              </div>
            </div>

            <div class="form-group">
              <label class="col-xs-3 control-label label_size">设备台数</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="num" placeholder="" type="text">
              </div>
            </div>

            <div class="form-group">
              <label class="col-xs-3 control-label label_size">测试功能</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="functions" placeholder="" type="text">
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label label_size">测量范围的最小值</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="minimize" placeholder="" type="text">
              </div>
            </div>

            <div class="form-group">
              <label class="col-xs-3 control-label label_size">测量范围的最大值</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="maximize" placeholder="" type="text">
              </div>
            </div>

            <div class="form-group">
              <label class="col-xs-3 control-label label_size">制造商</label>
              <div class="col-xs-6">
                <input class="form-control input_size" name="creator" placeholder="" type="text">
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label label_size">生产日期</label>
              <div class="col-xs-6">
                <input class="form-control input_size date-time-picker" readonly name="product_time" placeholder="" type="text">
              </div>
            </div>

          </div>
          <div class="form-group">
            <div class="col-xs-12 text-center">
              <button type="button" id="sub" class="btn btn-primary " >提 交 </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
  @include("user.footer")
  @include("user.common")
</body>

<script type="text/javascript">
var profession;
var device;
var bool;
$("#sub").click(function(){
  var real_name = $("input[name='real_name']").val().trim();
  var gender = $("input[name='gender']:checked").val().trim();
  var education = $("input[name='education']").val().trim();
  var profession = $("input[name='profession']").val().trim();
  var job = $("input[name='job']").val().trim();

  var name = $("input[name='name']").val().trim();
  var num = $("input[name='num']").val().trim();
  var functions = $("input[name='functions']").val().trim();
  var minimize = $("input[name='minimize']").val().trim();
  var maximize = $("input[name='maximize']").val().trim();
  var creator = $("input[name='creator']").val().trim();
  var product_time = $("input[name='product_time']").val().trim();


  profession = {
    real_name : real_name,
    gender : gender,
    education : education,
    profession : profession,
    job : job
  };

  device = {
    name : name,
    num : num,
    functions : functions,
    minimize : minimize,
    maximize : maximize,
    creator : creator,
    product_time : product_time
  };

  $.each(profession, function(k, v){
      if(v == '')
      {
        bool = true;
        return true;
      }
      else
      {
        bool = false;
      }
  })

  $.each(device, function(k, v){
    if(v == '')
    {
      bool = true;
      return true;
    }
    else
    {
      bool = false;
    }
  })

  if(bool)
  {
    warning("", "必填内容不能为空");
    return;
  }

  var groupData = JSON.parse($.cookie("groupStr"));


  $.post("validator_save", {groupData : groupData, profession : profession, device : device}, function (data){
    if(data.success)
    {
      success("", "提交成功");
      setTimeout(function(){
        window.location.href="<%url('uc/profile')%>";
      }, 2000)
    }

  })




})

</script>
</html>